// /**
//  * Copyright © 2013-2017 Magento, Inc. All rights reserved.
//  * See COPYING.txt for license details.
//  */

//
//    Common
//--------------------------------------

& when (@media-common = true) {

.login-container {
    .block {
        &-new-customer {
            .actions-toolbar {
                margin-top: 25px;
            }
        }
        .block-title {
            &:extend(.abs-login-block-title all);
            .lib-font-size(18);
        }
    }
    .fieldset {
        .lib-form-hasrequired(bottom);
        &:after {
            margin-top: 35px;
        }
    }
}

.block-addresses-list {
    .items.addresses {
        > .item {
            margin-bottom: @indent__base;
            &:last-child {
                margin-bottom: 0;
            }
        }
    }
}

.form-address-edit {
    #region_id {
        display: none;
    }
    .actions-toolbar .action.primary {
        &:extend(.abs-button-l all);
    }
}

.form-edit-account {
    .fieldset.password {
        display: none;
    }
}

.box-billing-address,
.box-shipping-address,
.box-information,
.box-newsletter {
    .box-content {
        line-height: 26px;
    }
}

// My account
.account {
    .page-title-wrapper {
        .page-title {
            display: inline-block;
        }
    }
    .messages {
        margin-bottom: @indent__base;
    }
    .column.main {
        margin-bottom: @indent__l;
        h2 {
            margin-top: 0;
        }
        .toolbar {
            text-align: center;
            .limiter-options {
                width: auto;
            }
        }
        .limiter {
            >.label {
                &:extend(.abs-visually-hidden all);
            }
        }
        .block:not(.widget) {
            &:extend(.abs-account-blocks all);
        }
    }
    .sidebar-additional {
        margin-top: 40px;
    }
    .table-wrapper {
        &:last-child {
            margin-bottom: 0;
        }
        .action {
            margin-right: 15px;
            &:last-child {
                margin-right: 0;
            }
        }
    }
    .table-return-items {
        .qty {
            .input-text {
                &:extend(.abs-input-qty all);
            }
        }
    }
}

// checkout address (create shipping address)
.field.street {
    .field.additional {
        .label {
            &:extend(.abs-visually-hidden all);
        }
    }
}


//
//    Blocks & Widgets
//--------------------------------------
.block {
    &:extend(.abs-margin-for-blocks-and-widgets all);
    .column.main & {
        &:last-child {
            margin-bottom: 0;
        }
    }
    .title {
        strong {
            .lib-heading(h4);
            .column.main & {
                font-size: @h3__font-size;
            }
        }
        margin-bottom: @indent__s;
    }
    p:last-child {
        margin: 0;
    }
    .box-actions {
        margin-top: @indent__xs;
    }
}

.control.captcha-image {
    .lib-css(margin-top, @indent__s);
    .captcha-img {
        vertical-align: middle;
    }
}

}

//
//    Mobile @screen__s
//--------------------------------------
.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__s) {
    .account {
        .column.main,
        .sidebar-additional {
            margin: 0;
        }
    }
}

//
//    Mobile @screen__m
//--------------------------------------
.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) {
    .login-container {
        .fieldset {
            &:after {
                text-align: center;
            }
        }
    }
    .account {
        .page.messages {
            margin-bottom: 40px;
        }
        .toolbar {
            &:extend(.abs-pager-toolbar-mobile all);
        }
    }
    .control.captcha-image {
        .captcha-img {
            display: block;
            .lib-css(margin-bottom, @indent__s);
        }
    }
    .customer-account-index {
        .page-title-wrapper {
            position: relative;
        }
    }
}

//
//    Desktop
//--------------------------------------
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
    .login-container {
        &:extend(.abs-add-clearfix-desktop all);
        .block {
            &:extend(.abs-blocks-2columns all);
            &.login {
                .actions-toolbar {
                    > .primary {
                        margin-bottom: 0;
                        margin-right: 30px;
                    }
                    > .secondary {
                        float: left;
                    }
                }
            }
        }
        .fieldset {
            &:after {
                &:extend(.abs-margin-for-forms-desktop all);
            }
            > .field {
                > .control {
                    width: 55%;
                }
            }
        }
    }

    .form-create-account {
        .fieldset-fullname {
            .fields {
                .field {
                    float: left;
                    margin: 0 @indent__s @indent__s 0;
                }
            }
            .field-name-prefix,
            .field-name-suffix {
                width: 50px;
            }
        }
    }

    .form.password.reset,
    .form.send.confirmation,
    .form.password.forget,
    .form.create.account {
        width: 50%;
        min-width: 600px;
    }

    // My account
    .account.page-layout-2columns-left {
        .sidebar-main,
        .sidebar-additional {
            width: 22.3%;
        }
        .column.main {
            width: 77.7%;
        }
    }

    .account {
        .column.main {
            .block:not(.widget) {
                .block-content {
                    &:extend(.abs-add-clearfix-desktop all);
                    .box {
                        &:extend(.abs-blocks-2columns all);
                    }
                }
            }
        }
        .toolbar {
            &:extend(.abs-pager-toolbar all);
        }
    }

    .block-addresses-list {
        .items.addresses {
            &:extend(.abs-add-clearfix-desktop all);
            > .item {
                &:extend(.abs-blocks-2columns all);
                margin-bottom: @indent__base;
                &:nth-last-child(1),
                &:nth-last-child(2) {
                    margin-bottom: 0;
                }
            }
        }
    }

    //
    //    Welcome block
    //--------------------------------------
    .dashboard-welcome-toggler {
        &:extend(.abs-visually-hidden-desktop all);
    }

    .control.captcha-image {
        .captcha-img {
            margin: 0 @indent__s @indent__s 0;
        }
    }
}
